同步服务订单信息
由于收款商户进行的某些“线下操作”会导致微信支付侧的订单状态与实际情况不符。**前置条件:**同步商户渠道收款成功信息时,即场景类型=“Order_Paid”,订单的状态需为
请求参数 | 类型 | 描述 |
---|---|---|
out_order_no | string | 商户服务订单号 |
json | object | 声明请求的JSON 数据结构 |
appid | string | 公众账号ID |
service_id | string | 服务ID |
type | string | 场景类型 |
detail | object | 内容信息详情 |
paid_time | string | 收款成功时间 |
php
$instance->v3->payscore->serviceorder->_out_order_no_->sync->postAsync([
'out_order_no' => '1234323JKHDFE1243252',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '500001',
'type' => 'Order_Paid',
'detail' => [
'paid_time' => '20091225091210',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/payscore/serviceorder/{out_order_no}/sync')->postAsync([
'out_order_no' => '1234323JKHDFE1243252',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '500001',
'type' => 'Order_Paid',
'detail' => [
'paid_time' => '20091225091210',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/payscore/serviceorder/{out_order_no}/sync']->postAsync([
'out_order_no' => '1234323JKHDFE1243252',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '500001',
'type' => 'Order_Paid',
'detail' => [
'paid_time' => '20091225091210',
],
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->payscore->serviceorder->_out_order_no_->sync->post([
'out_order_no' => '1234323JKHDFE1243252',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '500001',
'type' => 'Order_Paid',
'detail' => [
'paid_time' => '20091225091210',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/payscore/serviceorder/{out_order_no}/sync')->post([
'out_order_no' => '1234323JKHDFE1243252',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '500001',
'type' => 'Order_Paid',
'detail' => [
'paid_time' => '20091225091210',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/payscore/serviceorder/{out_order_no}/sync']->post([
'out_order_no' => '1234323JKHDFE1243252',
'json' => [
'appid' => 'wxd678efh567hg6787',
'service_id' => '500001',
'type' => 'Order_Paid',
'detail' => [
'paid_time' => '20091225091210',
],
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
out_order_no | string | 商户服务订单号 |
service_id | string | 服务ID |
appid | string | 服务商公众号ID |
mchid | string | 服务商商户号 |
service_introduction | string | 服务信息 |
state | string | 服务订单状态 |
state_description | string | 订单状态说明 |
post_payments | object[] | 后付费项目 |
name | string | 付费名称 |
amount | number | 付费金额 |
description | string | 付费说明 |
count | number | 付费数量 |
post_discounts | object[] | 商户优惠 |
name | string | 优惠名称 |
description | string | 优惠说明 |
amount | number | 优惠金额 |
risk_fund | object | 服务风险金 |
name | string | 风险名称 |
amount | number | 风险金额 |
description | string | 风险说明 |
total_amount | number | 总金额 |
need_collection | boolean | 是否需要收款 |
collection | object | 收款信息 |
state | string | 收款状态 |
total_amount | number | 总收款金额 |
paying_amount | number | 待收金额 |
paid_amount | number | 已收金额 |
details | object[] | 收款明细列表 |
amount | number | 单笔收款金额 |
paid_type | string | 收款成功渠道 |
paid_time | string | 收款成功时间 |
transaction_id | string | 微信支付交易单号 |
bank_type | string | 收款银行 |
time_range | object | 服务时间 |
start_time | string | 服务开始时间 |
end_time | string | 服务结束时间 |
start_time_remark | string | 服务开始时间备注 |
end_time_remark | string | 服务结束时间备注 |
location | object | 服务位置 |
start_location | string | 服务开始地点 |
end_location | string | 服务结束地点 |
attach | string | 附加数据 |
notify_url | string | 商户回调地址 |
openid | string | 服务商公众号下的用户标识 |
order_id | string | 微信支付服务订单号 |